3.944 \(\int \frac{1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^3} \, dx\)

Optimal. Leaf size=131 \[ -\frac{3 i}{16 a f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac{i}{16 a f \left (c^3+i c^3 \tan (e+f x)\right )}+\frac{x}{4 a c^3}-\frac{i}{8 a c f (c-i c \tan (e+f x))^2}-\frac{i}{12 a f (c-i c \tan (e+f x))^3} \]

[Out]

x/(4*a*c^3) - (I/12)/(a*f*(c - I*c*Tan[e + f*x])^3) - (I/8)/(a*c*f*(c - I*c*Tan[e + f*x])^2) - ((3*I)/16)/(a*f
*(c^3 - I*c^3*Tan[e + f*x])) + (I/16)/(a*f*(c^3 + I*c^3*Tan[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.155946, antiderivative size = 131, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.129, Rules used = {3522, 3487, 44, 206} \[ -\frac{3 i}{16 a f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac{i}{16 a f \left (c^3+i c^3 \tan (e+f x)\right )}+\frac{x}{4 a c^3}-\frac{i}{8 a c f (c-i c \tan (e+f x))^2}-\frac{i}{12 a f (c-i c \tan (e+f x))^3} \]

Antiderivative was successfully verified.

[In]

Int[1/((a + I*a*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^3),x]

[Out]

x/(4*a*c^3) - (I/12)/(a*f*(c - I*c*Tan[e + f*x])^3) - (I/8)/(a*c*f*(c - I*c*Tan[e + f*x])^2) - ((3*I)/16)/(a*f
*(c^3 - I*c^3*Tan[e + f*x])) + (I/16)/(a*f*(c^3 + I*c^3*Tan[e + f*x]))

Rule 3522

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rule 3487

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^3} \, dx &=\frac{\int \frac{\cos ^2(e+f x)}{(c-i c \tan (e+f x))^2} \, dx}{a c}\\ &=\frac{\left (i c^2\right ) \operatorname{Subst}\left (\int \frac{1}{(c-x)^2 (c+x)^4} \, dx,x,-i c \tan (e+f x)\right )}{a f}\\ &=\frac{\left (i c^2\right ) \operatorname{Subst}\left (\int \left (\frac{1}{16 c^4 (c-x)^2}+\frac{1}{4 c^2 (c+x)^4}+\frac{1}{4 c^3 (c+x)^3}+\frac{3}{16 c^4 (c+x)^2}+\frac{1}{4 c^4 \left (c^2-x^2\right )}\right ) \, dx,x,-i c \tan (e+f x)\right )}{a f}\\ &=-\frac{i}{12 a f (c-i c \tan (e+f x))^3}-\frac{i}{8 a c f (c-i c \tan (e+f x))^2}-\frac{3 i}{16 a f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac{i}{16 a f \left (c^3+i c^3 \tan (e+f x)\right )}+\frac{i \operatorname{Subst}\left (\int \frac{1}{c^2-x^2} \, dx,x,-i c \tan (e+f x)\right )}{4 a c^2 f}\\ &=\frac{x}{4 a c^3}-\frac{i}{12 a f (c-i c \tan (e+f x))^3}-\frac{i}{8 a c f (c-i c \tan (e+f x))^2}-\frac{3 i}{16 a f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac{i}{16 a f \left (c^3+i c^3 \tan (e+f x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.735402, size = 115, normalized size = 0.88 \[ \frac{\sec (e+f x) (\cos (3 (e+f x))+i \sin (3 (e+f x))) (-12 f x \sin (2 (e+f x))-3 i \sin (2 (e+f x))-2 i \sin (4 (e+f x))+(-3-12 i f x) \cos (2 (e+f x))+\cos (4 (e+f x))-9)}{48 a c^3 f (\tan (e+f x)-i)} \]

Antiderivative was successfully verified.

[In]

Integrate[1/((a + I*a*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^3),x]

[Out]

(Sec[e + f*x]*(Cos[3*(e + f*x)] + I*Sin[3*(e + f*x)])*(-9 + (-3 - (12*I)*f*x)*Cos[2*(e + f*x)] + Cos[4*(e + f*
x)] - (3*I)*Sin[2*(e + f*x)] - 12*f*x*Sin[2*(e + f*x)] - (2*I)*Sin[4*(e + f*x)]))/(48*a*c^3*f*(-I + Tan[e + f*
x]))

________________________________________________________________________________________

Maple [A]  time = 0.042, size = 135, normalized size = 1. \begin{align*}{\frac{-{\frac{i}{8}}\ln \left ( \tan \left ( fx+e \right ) -i \right ) }{fa{c}^{3}}}+{\frac{1}{16\,fa{c}^{3} \left ( \tan \left ( fx+e \right ) -i \right ) }}+{\frac{{\frac{i}{8}}}{fa{c}^{3} \left ( \tan \left ( fx+e \right ) +i \right ) ^{2}}}+{\frac{{\frac{i}{8}}\ln \left ( \tan \left ( fx+e \right ) +i \right ) }{fa{c}^{3}}}-{\frac{1}{12\,fa{c}^{3} \left ( \tan \left ( fx+e \right ) +i \right ) ^{3}}}+{\frac{3}{16\,fa{c}^{3} \left ( \tan \left ( fx+e \right ) +i \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))^3,x)

[Out]

-1/8*I/f/a/c^3*ln(tan(f*x+e)-I)+1/16/f/a/c^3/(tan(f*x+e)-I)+1/8*I/f/a/c^3/(tan(f*x+e)+I)^2+1/8*I/f/a/c^3*ln(ta
n(f*x+e)+I)-1/12/f/a/c^3/(tan(f*x+e)+I)^3+3/16/f/a/c^3/(tan(f*x+e)+I)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 1.30486, size = 201, normalized size = 1.53 \begin{align*} \frac{{\left (24 \, f x e^{\left (2 i \, f x + 2 i \, e\right )} - i \, e^{\left (8 i \, f x + 8 i \, e\right )} - 6 i \, e^{\left (6 i \, f x + 6 i \, e\right )} - 18 i \, e^{\left (4 i \, f x + 4 i \, e\right )} + 3 i\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{96 \, a c^{3} f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

1/96*(24*f*x*e^(2*I*f*x + 2*I*e) - I*e^(8*I*f*x + 8*I*e) - 6*I*e^(6*I*f*x + 6*I*e) - 18*I*e^(4*I*f*x + 4*I*e)
+ 3*I)*e^(-2*I*f*x - 2*I*e)/(a*c^3*f)

________________________________________________________________________________________

Sympy [A]  time = 0.791505, size = 209, normalized size = 1.6 \begin{align*} \begin{cases} \frac{\left (- 8192 i a^{3} c^{9} f^{3} e^{8 i e} e^{6 i f x} - 49152 i a^{3} c^{9} f^{3} e^{6 i e} e^{4 i f x} - 147456 i a^{3} c^{9} f^{3} e^{4 i e} e^{2 i f x} + 24576 i a^{3} c^{9} f^{3} e^{- 2 i f x}\right ) e^{- 2 i e}}{786432 a^{4} c^{12} f^{4}} & \text{for}\: 786432 a^{4} c^{12} f^{4} e^{2 i e} \neq 0 \\x \left (\frac{\left (e^{8 i e} + 4 e^{6 i e} + 6 e^{4 i e} + 4 e^{2 i e} + 1\right ) e^{- 2 i e}}{16 a c^{3}} - \frac{1}{4 a c^{3}}\right ) & \text{otherwise} \end{cases} + \frac{x}{4 a c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))**3,x)

[Out]

Piecewise(((-8192*I*a**3*c**9*f**3*exp(8*I*e)*exp(6*I*f*x) - 49152*I*a**3*c**9*f**3*exp(6*I*e)*exp(4*I*f*x) -
147456*I*a**3*c**9*f**3*exp(4*I*e)*exp(2*I*f*x) + 24576*I*a**3*c**9*f**3*exp(-2*I*f*x))*exp(-2*I*e)/(786432*a*
*4*c**12*f**4), Ne(786432*a**4*c**12*f**4*exp(2*I*e), 0)), (x*((exp(8*I*e) + 4*exp(6*I*e) + 6*exp(4*I*e) + 4*e
xp(2*I*e) + 1)*exp(-2*I*e)/(16*a*c**3) - 1/(4*a*c**3)), True)) + x/(4*a*c**3)

________________________________________________________________________________________

Giac [A]  time = 1.37611, size = 166, normalized size = 1.27 \begin{align*} -\frac{-\frac{6 i \, \log \left (\tan \left (f x + e\right ) + i\right )}{a c^{3}} + \frac{6 i \, \log \left (\tan \left (f x + e\right ) - i\right )}{a c^{3}} + \frac{3 \,{\left (-2 i \, \tan \left (f x + e\right ) - 3\right )}}{a c^{3}{\left (\tan \left (f x + e\right ) - i\right )}} + \frac{11 i \, \tan \left (f x + e\right )^{3} - 42 \, \tan \left (f x + e\right )^{2} - 57 i \, \tan \left (f x + e\right ) + 30}{a c^{3}{\left (\tan \left (f x + e\right ) + i\right )}^{3}}}{48 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))/(c-I*c*tan(f*x+e))^3,x, algorithm="giac")

[Out]

-1/48*(-6*I*log(tan(f*x + e) + I)/(a*c^3) + 6*I*log(tan(f*x + e) - I)/(a*c^3) + 3*(-2*I*tan(f*x + e) - 3)/(a*c
^3*(tan(f*x + e) - I)) + (11*I*tan(f*x + e)^3 - 42*tan(f*x + e)^2 - 57*I*tan(f*x + e) + 30)/(a*c^3*(tan(f*x +
e) + I)^3))/f